var headerOfSchedule = {
    /**
     * @param {*} leftArrow 左箭头
     * @param {*} title 标题
     * @param {*} right 右边内容
     * @param {*} placeholder 占位: 后面的元素不需要再使用margin-top来解决固定定位造成的塌陷问题
     */
    addHeader(leftArrow, title, right, placeholder) {
        var _header = document.querySelector("header");
        // 删除原有header
        if (_header) {
            _header.remove();

        }
        // 占位符
        if (placeholder) {
            var _div = document.createElement("div");
            _div.style.height = "51px";
            _div.style.borderBottom = "1px solid #f4f4f4";
            document.body.prepend(_div);
        }

        var _header = document.createElement("header");
        _header.id = "my-header";
        _header.className = "flex fixed jc-sb aic w100p bg-fff pl-15 pr-15";
        _header.innerHTML = `<p class="item left flex aic f20">
        ${leftArrow ? '日程' : ""}
      </p>
      <p class="f16">${title}</p>
      <p class="item right-sb">${right ? right : ""}</p>
    `;
        if (_div) {
            document.body.insertBefore(_header, _div);
        } else {
            document.body.prepend(_header);
        }
    },

    addFooter(num) {
        var _footer = document.querySelector("footer");
        // 删除原有header
        if (_footer) {
            _footer.remove();
        }

        var isProd = location.href.includes("huruqing.cn");
        var _footer = document.createElement("footer");
        _footer.id = "my-footer";
        _footer.className = "bg-fff w100p fixed flex jc-sa aic";
        _footer.innerHTML = `
        <a href="${
          isProd ? "/wangmin" : ""
        }/Office/bangong/banggong.html" class="flex fdc jc-sb aic ${
      num === 1 ? "active" : ""
    }">
            <i class="iconfont icon-bangongfuwu"></i>
            <span class="f12">办公</span>
        </a>
        <a href="${
          isProd ? "/wangmin" : ""
        }/Schedule/schedule.html" class="flex fdc jc-sb aic ${
      num === 2 ? "active" : ""
    }">
            <i class="iconfont icon-richeng1"></i>
            <span class="f12">日程</span>
        </a>
        <a href="${
          isProd ? "/wangmin" : ""
        }/Addressbook/addressList.html" class="flex fdc jc-sb aic ${
      num === 3 ? "active" : ""
    }">
            <i class="iconfont icon-tongxunlu1"></i> 
            <span class="f12">通讯录</span>
        </a>
        <a href="${
          isProd ? "/wangmin" : ""
        }/Personalcenter/my.html" class="flex fdc jc-sb aic ${
      num === 4 ? "active" : ""
    }">
            <i class="iconfont icon-wode11"></i>
            <span class="f12">我的</span>
        </a>
    `;
        document.body.appendChild(_footer);
    }
}